We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

$form->bind($data, $item) error with utf8

$form->bind($data, $item);
if ($form->isValid()) {
    print_r($item->name); exit;
}

Data Post is ['id' => 1, 'name' => 'Trương Quốc Long'] When call $form->bind is $item->name is TrongQucLong. It lost utf8 format. It a bug?



2.1k
edited Feb '15

bind deals with strings and i dont think its utf8 enabled. you might have to encode it using urlencode =d

https://docs.phalcon.io/pt/latest/api/Phalcon_Escaper.html

basically the data is automatically escaped. i think u need mbstring if you dont encode it. =d